package com.bosssoft.boss_exam_db.service.busines.impl;

import com.bosssoft.boss_exam_db.entity.Menu;
import com.bosssoft.boss_exam_db.entity.Role;
import com.bosssoft.boss_exam_db.mapper.MenuMapper;
import com.bosssoft.boss_exam_db.mapper.RoleMapper;
import com.bosssoft.boss_exam_db.service.busines.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private RoleMapper roleMapper;

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public void modifyInsertTxFunction() {
        Menu menu = new Menu();
        menu.setName("mmmmmm");
        Role role = new Role();
        role.setName("rrrrrrr");
        menuMapper.insertSelective(menu);
        System.out.println("中间");
        int a =  1/0;
        roleMapper.insertSelective(role);
    }
}
